var path = require("path");
var config = require("./config");

module.exports = {
    entry: {
        mirror: path.join(config.PATH_SOURCE, "index.js"),
        document: path.join(config.PATH_DOCUMENT, "index.js")
    },
    resolve: {
        extensions: [".js"],
        alias: {
            'vue$': 'vue/dist/vue.js',
            "core": path.resolve(config.PATH_ROOT, "source", "core")
        }
    },
    output: {
        filename: '[name].js',
        path: config.PATH_BUILD,
        publicPath: "/"
    },
    module: {
        rules: [{
                test: /\.js$/,
                exclude: /node_modules/,
                loader: "babel-loader",
                query: { compact: false }
            },
            {
                test: /\.(less|css)$/,
                loader: "style-loader!css-loader!less-loader",
            }
        ]
    }
};